<?php

namespace app\model\school;

use app\BaseModel;
use app\model\not_del\UserModel;
use think\model\relation\BelongsTo;

/**
 * 心理学堂-课程-章节-评论
 */
class SchoolCourseChapterCommentModel extends BaseModel
{
    protected $name = 'school_course_chapter_comment';

    /**
     * 用户
     * @return BelongsTo
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(UserModel::class,'uid')->bind([
            'user_name' => 'name',
            'avatar' => 'avatar',
        ]);
    }
}